<template>
  <div class="jp_content">
    <h1>{{ STATUS }}</h1>
    <H2>{{ static }}</H2>
    <a-button @click="handleClick">Click</a-button>
    <!-- <ul>
      {{ CONTEXT.status }}
    </ul> -->

  </div>
</template>

<script>
import {STATUS} from "@/static/js/context.js";
import DEFAULT_CONTEXT from "@/static/js/defaultContext.js";
import { subStr } from "@/api/NewsTable.js";


export default {
  name: 'news',
  data() {
    return {
      STATUS
    }
  },
  computed: {
    static() {
      return DEFAULT_CONTEXT.NAME
    }
  },
 
  methods: {
    handleClick(){
      let str = prompt("请输入需要截取的内容")
      if(!str) {alert('数据为空')}
      
      let subString = subStr(str)
      alert(subString)
    }
  },

}
</script>

